# -*- coding: utf-8 -*-
"""
Created on Fri Nov 17 15:41:48 2017

@author: JanComputer
"""
from .Parser import Parser
from bs4 import BeautifulSoup
class ParserPengFu(Parser):
    def paserHtml(self):
        if self.data:
            data=self.data
            text=data.get('text')
            taga=None
            next_url=None
            if text is not None:
                bs=BeautifulSoup(text,'lxml')
                taga=bs.find_all(class_='content-img clearfix pt10 relative')
                next_url=bs.find(class_='page-a page-04').next_sibling.next_sibling
                if next_url is not None:
                    next_url=next_url['href']
                return {'jokes':taga,'next_url':next_url}
